package com.flnet.spsys.controller;

import com.flnet.spsys.entity.WechatuserEntity;
import com.flnet.spsys.service.WechatuserService;
import com.flnet.spsys.utils.ResultJson;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiResponse;
import io.swagger.annotations.ApiResponses;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/wechatuser")
public class WechatuserController {
    @Autowired
    private WechatuserService wechatuserService;
    @ApiOperation(value = "微信用户信息",notes = "获取微信用户信息")
    @ApiResponses(
            @ApiResponse(code = 200,message = "获取成功",response = ResultJson.class)
    )
    @PostMapping("/info")
    public Object getWechatuserInfo(){
        List<WechatuserEntity> wechatuserEntityList = wechatuserService.list();
        return ResultJson.success(wechatuserEntityList);
    }


}
